81 WDT_A_hold(WDT_A_BASE);
84 GPIO_setAsPeripheralModuleFunctionInputPin(
93 while (Ref_isRefGenBusy(REF_BASE)) ;
95 Ref_setReferenceVoltage(REF_BASE,
98 Ref_enableReferenceVoltage(REF_BASE);
110 ADC12_A_init(ADC12_A_BASE,
111 ADC12_A_SAMPLEHOLDSOURCE_SC,
112 ADC12_A_CLOCKSOURCE_ADC12OSC,
113 ADC12_A_CLOCKDIVIDER_1);
115 ADC12_A_enable(ADC12_A_BASE);
123 ADC12_A_setupSamplingTimer(ADC12_A_BASE,
124 ADC12_A_CYCLEHOLD_64_CYCLES,
125 ADC12_A_CYCLEHOLD_4_CYCLES,
126 ADC12_A_MULTIPLESAMPLESENABLE);
136 ADC12_A_configureMemoryParam configureMemoryParam = {0};
137 configureMemoryParam.memoryBufferControlIndex = ADC12_A_MEMORY_0;
138 configureMemoryParam.inputSourceSelect = ADC12_A_INPUT_A0;
139 configureMemoryParam.positiveRefVoltageSourceSelect = ADC12_A_VREFPOS_INT;
140 configureMemoryParam.negativeRefVoltageSourceSelect = ADC12_A_VREFNEG_AVSS;
141 configureMemoryParam.endOfSequence = ADC12_A_NOTENDOFSEQUENCE;
142 ADC12_A_configureMemory(ADC12_A_BASE ,&configureMemoryParam);
153 ADC12_A_startConversion(ADC12_A_BASE,
155 ADC12_A_SINGLECHANNEL);
158 while (ADC12IFG0 != ADC12_A_getInterruptStatus(ADC12_A_BASE,